package com.cqie.hospitalescort.enums;

/**
 * 登录端
 */
public enum LoginTerminalEnum {

    MINI_PROGRAM("mini-program", "小程序端"),

    BROWSER("browser", "浏览器端");

    private final String code;

    private final String desc;

    LoginTerminalEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static LoginTerminalEnum getEnum(String code) {
        for (LoginTerminalEnum e : LoginTerminalEnum.values()) {
            if (e.getCode().equals(code)) {
                return e;
            }
        }
        return null;
    }

}
